package com.atguigu.gulimall.product.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * spu属性值
 * 
 * @author GuanMing.Zhu
 * @email xiaoming.080797@gmail.com
 * @date 2020-10-20 20:52:23
 */
@Data
@TableName("pms_product_attr_value")
@NoArgsConstructor
@AllArgsConstructor
public class ProductAttrValueEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
	@TableId
	private Long id;
	/**
	 * 商品id
	 */
	private Long spuId;
	/**
	 * 属性id
	 */
	private Long attrId;
	/**
	 * 属性名
	 */
	private String attrName;
	/**
	 * 属性值
	 */
	private String attrValue;
	/**
	 * 顺序
	 */
	private Integer attrSort;
	/**
	 * 快速展示【是否展示在介绍上；0-否 1-是】
	 */
	private Integer quickShow;

	public ProductAttrValueEntity(Long spuId, Long attrId,String attrName, String attrValues, Integer showDesc) {
		this.spuId = spuId;
		this.attrId = attrId;
		this.attrName = attrName;
		this.attrValue = attrValues;
		this.quickShow = showDesc;
	}

	public ProductAttrValueEntity initSpuId(Long spuId) {
		this.spuId = spuId;
		return this;
	}
}
